package cn.buk.tms.dao;

import cn.buk.tms.entity.order.flight.FlightCatchOrder;
import cn.buk.tms.entity.misc.OperationLog;
import cn.buk.tms.sc.SearchFlightOrderCriteria;

import java.util.List;

/**
 * @author yfdai
 */
public interface FlightCatchOrderDao {
	
	/**
	 * 保存一个新订单
	 */
	int createOrder(FlightCatchOrder o, String username);

	/**
	 * 根据id获取订单内容
	 * @param id
	 * @return
	 */
	FlightCatchOrder getOrder(int id);

    /**
     * 根据查询条件查找订单
     */
	List<FlightCatchOrder> searchOrder(int enterpriseId, String username, SearchFlightOrderCriteria sc);

	int updatePassenger(int enterpriseId, int orderId, int id, String name, String idNo, String ffpNo, String mobile);

	int updateRemark(int enterpriseId, String username, int orderId, String remark);

	int updatePnr(int enterpriseId, String username, int orderId, String pnrNo);

	/**
	 * 取消机票订单
	 */
    int cancelFlightOrder(int enterpriseId, String username, int orderId, int reasonCode, String reasonDesc);

    List<OperationLog> searchHistory(int enterpriseId, int orderId);

	int monitorFlightCatchOrder(int enterpriseId, String username, int orderId);

    int deleteCatchOrder(int enterpriseId, int orderId);
}